package com.tiancheng.trade.order.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.tiancheng.trade.commom.core.exception.BusinessException;
import com.tiancheng.trade.order.bo.RefundNotifyBO;
import com.tiancheng.trade.order.model.RefundOrders;
import com.tiancheng.trade.order.model.RefundOrdersDetail;
import com.tiancheng.trade.order.vo.api.res.RefundCreateResVO;
import com.tiancheng.trade.order.vo.open.order.OpenRefundCreateResVO;
import com.tiancheng.trade.order.vo.open.order.OpenRefundVO;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: kellen
 * @Description: 退款订单 service
 * @Date: create in 2024/11/26 20:13
 */

@Service
public interface RefundOrdersService extends IService<RefundOrders> {

    /**
     * 创建并提交退款
     * @param refundVO
     * @return
     * @throws BusinessException
     */
    OpenRefundCreateResVO createAndSubmit(OpenRefundVO refundVO) throws BusinessException;

    /**
     * 保存退款结果
     *
     * @param refundNotifyBO
     * @throws BusinessException
     */
    List<RefundOrdersDetail> saveRefundResult(RefundNotifyBO refundNotifyBO) throws BusinessException;

    /**
     * 查询退款订单
     * @param refundId
     * @return
     */
    RefundOrders getByRefundId(String refundId);
}
